package homework2;

/**
 * 子类具有计算工资的特定行为
 * 工程师
 */
public class Engineer extends Employee{
    private double overtimePay;//加班 费

    public Engineer() {
    }

    public Engineer(String name, int age, double salary, double overtimePay) {
        super(name, age, salary);
        this.overtimePay = overtimePay;
    }

    @Override
    public double calculateSalary() {
        return super.calculateSalary() + overtimePay;
    }
}
